const { log } = require("console");
import { log } from './../../node_modules/.store/@types+node@22.14.1/node_modules/@types/node/util.d';

function Vechile(brandNo,price){
    console.log('this',this);
    
    // 父类
    this.brandNo = brandNo
    this.price = price
}

Vechile.prototype.sale = function (){
    console.log(this + "销售")
}

function Bus(brandNo,price,seatNo){
    // 子类
    // Vechile.call(this,brandNo,price)
    Vechile.apply(this,brandNo,price)
    this.seatNo = seatNo
}

let bus = new Bus('大巴',20,64)
console.log('bus',bus);

function Car(brandNo,price,types){
    // 子类
    // Vechile.call(this,brandNo,price)
    Vechile.apply(this,brandNo,price)
    this.seatNo = types
}

